"""
    Linux目前的发行版有：
    Ubuntu、RedHat、CentOS、Debian、Fedora、SuSE、OpenSUSE、Arch Linux等
"""

def calculator():
    while True:
        num1 = int(input("请输入第一个数字: "))
        operator = input("请输入操作符(比如+ - * /): ")
        num2 = int(input("请输入第二个数字: "))

        result = 0

        if operator == '+':
            result = num1 + num2
        elif operator == '-':
            result = num1 - num2
        elif operator == '*':
            result = num1 * num2
        elif operator == '/':
            result = num1 / num2
        else:
            print("无效的操作符")
            continue

        print("计算结果是:", result)

        onceagain = input("是否继续计算？(y/n): ")
        if onceagain.lower() != 'y':
            break

calculator()


